<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div class="one"  name="lili">1111</div>
		<script>
			var div=document.querySelector("div");
             //1.获取div身上的属性 getAttribute()
			//console.log(div.getAttribute("class"));
			//2. 修改属性
			div.setAttribute("class","two");
			//3. 新增属性
			div.setAttribute("title","1111");
			//4. 删除属性
			div.removeAttribute("name");
			
			// var obj={
			// 	name:"lili"
			// }
			// delete obj["name"]
		</script>
	</body>
</html>
